// 创建图表的hook函数

import { ref } from 'vue'
// 功能梳理 根据传入的参数 可以创建一条折线或者多条
// 曲线图的名字由 传入的参数决定
// 

export const createChart = () => {

}

const ICchangeChart = ref({});
    let ICchangeChartLabel = [];
    let ICBusNum = []; // 商家总数
    let ICBusStock = []; // 库存
    let ICCurYear = '2022'
    ICchangeChart.value = {
      type: "line",
      title: {
        text: `IC交易网变化图(${ICCurYear})`,
      },
      labels: ["4/20", "4/21", "4/22", "4/23", "4/24", "4/25", "4/26"],
      datasets: [
        {
          label: "商家总数",
          data: [234, 278, 270, 190, 230, 400, 300],
        },
        {
          label: "总库存",
          data: [164, 178, 150, 135, 160, 300, 100],
        },
      ],
    };